<div class="main detail-info">
  <div class="main-header">
    <div class="pa-icon-div pull-left fs-14">
      <i class="iconfont icon-shouye fs-14 icon-vertical-top"></i>
      <span class="fs-vertical-middle">工作台>人员管理>人员信息>
      <span class="fs-theme-color">{{vm.name}}</span>
      </span>
    </div>
    <go-back></go-back>
  </div>
  <div class="switch-tabs clear detail-switch" style="margin-top: 2px;">
    <div class="table-item"
      ng-repeat="item in vm.tabData"
      ng-class="{'active': $index == vm.selectedIndex}"
      ng-click="vm.switchTab(item, $index)"
      ng-hide="item.id == 2 && vm.orgType == 1">{{item.name}}</div>
  </div>
  <div class="main-content clearfix worker-base-info" ng-show="vm.selectedIndex === 0">
    <div class="info-item fs0 info-item-other">
      <div class="base-info-fl">
        <img ng-src="{{vm.$getAvatarSrc()}}" alt="">
      </div>
      <div class="base-info-fr">
        <div class="info-item-header fs-16">
          <div class="pa-form-control">
            <label class="pa-form-control-label">姓名：</label>
            <span class="pa-form-control-span pa-form-header-span">{{vm.workerDetailInfo.orgPersonBean.fullName}}</span>
          </div>
          <div class="pa-form-control staff-code"
            ui-sref="workerEncodingRules">
            <span>（人员编码：</span><span class="fa-theme-color">{{vm.workerDetailInfo.orgPersonBean.code}}</span><span>）</span>
          </div>
          <!-- <div class="pa-form-control fr">
            <label>{{vm.workerDetailInfo.orgPersonBean.type === '1' ? '普通人员' : vm.workerDetailInfo.orgPersonBean.type === '2' ? '特种作业人员' : vm.workerDetailInfo.orgPersonBean.type === '3' ? '三类人员' : ''}}</label>
          </div> -->
        </div>
        <div class="pa-form-control w-50 fs-16">
          <label class="fs-theme-color pa-info-label">岗&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;位</label>
          <span class="pa-form-control-span">{{vm.workerDetailInfo.orgPersonBean.postName}}</span>
        </div>
        <div class="pa-form-control w-50 fs-16">
          <label class="fs-theme-color pa-info-label">部&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;门</label>
          <span class="pa-form-control-span">{{vm.workerDetailInfo.orgPersonBean.departmentName}}</span>
        </div>
        <div class="pa-form-control w-50 fs-16">
          <label class="fs-theme-color pa-info-label">单&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;位</label>
          <span class="pa-form-control-span">{{vm.workerDetailInfo.orgPersonBean.orgName}}</span>
        </div>
        <div class="pa-form-control w-50 fs-16">
          <label class="fs-theme-color pa-info-label">进场时间</label>
          <span class="pa-form-control-span">{{vm.workerDetailInfo.orgPersonBean.inTime | date:"yyyy-MM-dd"}}</span>
        </div>
      </div>
    </div>
    <div class="info-item info-item-general clearfix">
      <div class="info-item-header fs-14">
        <label class="info-item-header-label">基本信息</label>
      </div>
      <div class="pa-form-control">
        <label class="fs-theme-color pa-base-info-label">身份证号：</label>
        <span class="pa-form-control-span">{{vm.workerDetailInfo.orgPersonBean.idNo}}</span>
      </div>
      <div class="pa-form-control">
        <label class="fs-theme-color pa-base-info-label">联系方式：</label>
        <span class="pa-form-control-span">{{vm.workerDetailInfo.orgPersonBean.cellphone}}</span>
      </div>
      <div class="pa-form-control">
        <label class="fs-theme-color pa-base-info-label">出场时间：</label>
        <span class="pa-form-control-span">{{vm.workerDetailInfo.orgPersonBean.outTime | date:"yyyy-MM-dd"}}</span>
      </div>
      <div class="pa-form-control">
        <label class="fs-theme-color pa-base-info-label">性别：</label>
        <span class="pa-form-control-span">
          {{vm.workerDetailInfo.personCollectBean.idCardBean.sex == 1 ? '男' : vm.workerDetailInfo.personCollectBean.idCardBean.sex == 2 ? '女' : '-'}}</span>
      </div>
      <div class="pa-form-control">
        <label class="fs-theme-color pa-base-info-label">出生日期：</label>
        <span class="pa-form-control-span">{{vm.workerDetailInfo.personCollectBean.idCardBean.birthdayStr}}</span>
      </div>
      <div class="pa-form-control">
        <label class="fs-theme-color pa-base-info-label">年龄：</label>
        <span class="pa-form-control-span">{{vm.workerDetailInfo.personCollectBean.idCardBean.age}}</span>
      </div>
      <div class="pa-form-control">
        <label class="fs-theme-color pa-base-info-label">民族：</label>
        <span class="pa-form-control-span">{{vm.workerDetailInfo.personCollectBean.idCardBean.nation}}</span>
      </div>
      <div class="pa-form-control">
        <label class="fs-theme-color pa-base-info-label">籍贯：</label>
        <span class="pa-form-control-span">{{vm.workerDetailInfo.orgPersonBean.nativePlace}}</span>
      </div>
      <div class="pa-form-control">
        <label class="fs-theme-color pa-base-info-label">学历：</label>
        <span class="pa-form-control-span">{{vm.workerDetailInfo.orgPersonBean.degreeName}}</span>
      </div>
      <div class="pa-form-control">
        <label class="fs-theme-color pa-base-info-label">家庭地址：</label>
        <span class="pa-form-control-span">{{vm.workerDetailInfo.personCollectBean.idCardBean.address}}</span>
      </div>
      <div class="pa-form-control">
        <label class="fs-theme-color pa-base-info-label">备注：</label>
        <span class="pa-form-control-span">{{vm.workerDetailInfo.orgPersonBean.remark}}</span>
      </div>
      <div class="pa-form-control pa-base-info-block">
        <label class="fs-theme-color pa-base-info-label">指纹信息：</label>
        <span class="pa-form-control-span">已采集</span>
      </div>
      <div class="pa-form-control pa-base-info-block">
        <label class="fs-theme-color pa-base-info-label">智能卡号：</label>
        <span class="pa-form-control-span">已绑定（{{vm.workerDetailInfo.orgPersonBean.rfidNo}}）</span>
      </div>
    </div>
    <div class="info-item info-table fs-14">
      <div class="info-item-header">
        <label class="info-item-header-label">证书信息</label>
      </div>
      <table class="add-table">
        <thead>
          <tr>
            <th ng-hide="vm.workerDetailInfo.orgPersonBean.type == 1">证书类别</th>
            <th>证书编号</th>
            <th>发证单位</th>
            <th>发证时间</th>
            <th>有效日期</th>
          </tr>
        </thead>
        <tbody>
          <tr ng-repeat="certificate in vm.workerDetailInfo.certificateList">
            <td>{{certificate.type || '-'}}</td>
            <td>{{certificate.code || '-'}}</td>
            <td>{{certificate.issueUnit || '-'}}</td>
            <td>{{certificate.issueDate | date:"yyyy-MM-dd" || '-'}}</td>
            <td>{{certificate.validPeriod | date:"yyyy-MM-dd" || '-'}}</td>
          </tr>
        </tbody>
      </table>
    </div>
    <div class="info-item">
      <div class="info-item-header fs-14">
        <label class="info-item-header-label">附件信息（简历/资料等附件）</label>
      </div>
      <div class="file-list">
        <div ng-repeat="file in vm.workerDetailInfo.orgPersonFileList" style="margin: 10px;">
          {{file.fileBean.fileName}}
          <a class="pa-btn file-del-btn" target="_blank"
            ui-sref="documentPreview({id: file.fileBean.id})">预览</a>
          <a class="pa-btn file-del-btn" target="_blank"
            ng-href="{{vm.getDownloadSrc(file.fileBean.id)}}" download="{{file.fileBean.fileName}}">下载</a>
        </div>
      </div>
    </div>
  </div>
  <div class="main-content clearfix" ng-show="vm.selectedIndex === 1">
    <div class="tab-table-brief">安全教育培训</div>
    <div class="pa-table-container" data-expand-detail>
      <table class="pa-table">
        <thead>
          <tr>
            <th class="table-text-left">培训时间</th>
            <th>教育培训主题</th>
            <th>培训地点</th>
            <th>组织部门</th>
            <th>主讲人</th>
          </tr>
        </thead>
        <tbody>
          <tr ng-show="vm.$tableTech.fetchTimes > 0 &amp;&amp; vm.$tableTech.paginationTech.total == 0 &amp;&amp; !vm.$tableTech.isTableLoading" class="ng-scope ng-hide" aria-hidden="true">
            <td colspan="5">
              <div>暂无数据</div>
            </td>
          </tr>
          <tr ng-show="vm.$tableTech.isTableLoading" class="ng-scope ng-hide" aria-hidden="true">
            <td colspan="5">
              <div>数据加载中...</div>
            </td>
          </tr>
          <tr ng-repeat="item in vm.workerTraningInfo track by $index" data-expand>
            <td class="table-text-left table-text-alignment">{{item.startTime | date:"yyyy-MM-dd" || '-'}}</td>
            <td>{{item.name || '-' }}</td>
            <td>{{item.site || '-'}}</td>
            <td>{{item.organizer || '-'}}</td>
            <td>{{item.compere || '-'}}</td>
            <td data-hide="附件: ">
              <div class="file-list-folding">
                <div class="file-item" ng-repeat="file in item.files">
                  <span class="file-item-span fl">{{file.fileName}}</span>
                  <a class="pa-btn file-del-btn" target="_blank"
                    ui-sref="documentPreview({id: file.id})">预览</a>
                  <a class="pa-btn file-del-btn" target="_blank"
                    ng-href="{{vm.getDownloadSrc(file.id)}}" download="{{file.fileName}}">下载</a>
                </div>
              </div>
            </td>
          </tr>
        </tbody>
      </table>
      <div style="margin:20px 0;height:30px;display: inline-block;">共计<span style="color: #008bdd">{{vm.$tableTech.paginationTech.totalItems}}</span>条</div>
      <ul uib-pagination
        total-items="vm.$tableTech.paginationTech.totalItems"
        items-per-page="vm.$tableTech.pagination.ITEMS_PER_PAGE"
        ng-model="vm.$tableTech.paginationTech.currentPage"
        ng-change="vm.$getWorkerTech(vm.wid)"
        max-size="vm.$tableTech.paginationTech.maxSize"
        next-text="下一页"
        previous-text="上一页"
        class="pagination-sm pull-right"
        boundary-link-numbers="true"
        rotate="true"
        force-ellipses="true"></ul>
    </div>
  </div>
  <div class="main-content clearfix" ng-show="vm.selectedIndex === 2">
    <div class="tab-table-brief">安全技术交底</div>
    <div class="pa-table-container">
      <table class="pa-table" data-expand-detail>
        <thead>
          <tr>
            <th class="table-text-left">交底时间</th>
            <th>交底名称</th>
            <th>交底类型</th>
            <th>交底地点</th>
            <th>交底人</th>
          </tr>
        </thead>
        <tbody>
          <tr ng-show="vm.$tableDisclosure.fetchTimes > 0 &amp;&amp; vm.$tableDisclosure.paginationDisclosure.total == 0 &amp;&amp; !vm.$tableDisclosure.isTableLoading" class="ng-scope ng-hide" aria-hidden="true">
            <td colspan="5">
              <div>暂无数据</div>
            </td>
          </tr>
          <tr ng-show="vm.$tableDisclosure.isTableLoading" class="ng-scope ng-hide" aria-hidden="true">
            <td colspan="5">
              <div>数据加载中...</div>
            </td>
          </tr>
          <tr ng-repeat="item in vm.workerDisclosureInfo track by $index" data-expand>
            <td class="table-text-left table-text-alignment">{{item.startTime | date:"yyyy-MM-dd"}}</td>
            <td>{{item.name || '-'}}</td>
            <td>{{item.technicalType == 1 ? '项目部级' : item.technicalType == 2 ? '班组级' : item.technicalType == 3 ? '工种级'  '-'}}</td>
            <td>{{item.site || '-'}}</td>
            <td>{{item.compere}}</td>
            <td expand-name="附件名" expand-value="item.files">
              <div class="text-left" ng-repeat="file in item.files">
                <span>{{file.fileName}}</span>
                <a class="pa-btn file-del-btn" target="_blank"
                  ui-sref="documentPreview({id: file.id})">预览</a>
                <a class="pa-btn file-del-btn" target="_blank"
                  ng-href="{{vm.getDownloadSrc(file.id)}}" download="{{file.fileName}}">下载</a>
              </div>
            </td>
            <td data-hide="附件: ">
              <div class="file-list-folding">
                <div class="file-item" ng-repeat="file in item.files">
                  <span class="file-item-span fl">{{file.fileName}}</span>
                  <a class="pa-btn file-del-btn" target="_blank"
                    ui-sref="documentPreview({id: file.id})">预览</a>
                  <a class="pa-btn file-del-btn" target="_blank"
                    ng-href="{{vm.getDownloadSrc(file.id)}}" download="{{file.fileName}}">下载</a>
                </div>
              </div>
            </td>
          </tr>
        </tbody>
      </table>
      <div style="margin:20px 0;height:30px;display: inline-block;">共计<span style="color: #008bdd">{{vm.$tableDisclosure.paginationDisclosure.totalItems}}</span>条</div>
      <ul uib-pagination
        total-items="vm.$tableDisclosure.paginationDisclosure.totalItems"
        items-per-page="vm.$tableDisclosure.pagination.ITEMS_PER_PAGE"
        ng-model="vm.$tableDisclosure.paginationDisclosure.currentPage"
        ng-change="vm.$getWorkerDisclosure(vm.wid)"
        max-size="vm.$tableDisclosure.paginationDisclosure.maxSize"
        next-text="下一页"
        previous-text="上一页"
        class="pagination-sm pull-right"
        boundary-link-numbers="true"
        rotate="true"
        force-ellipses="true"></ul>
    </div>
  </div>
  <div class="main-content clearfix" ng-show="vm.selectedIndex === 3">
    <div class="tab-table-brief">进出场记录</div>
    <div class="pa-table-container">
      <table class="pa-table">
        <thead>
          <tr>
            <th>分类</th>
            <th>时间</th>
          </tr>
        </thead>
        <tbody>
          <tr ng-show="vm.$tableInOut.fetchTimes > 0 &amp;&amp; vm.$tableInOut.paginationInOut.total == 0 &amp;&amp; !vm.$tableInOut.isTableLoading" class="ng-scope ng-hide" aria-hidden="true">
            <td colspan="6">
              <div>暂无数据</div>
            </td>
          </tr>
          <tr ng-show="vm.$tableInOut.isTableLoading" class="ng-scope ng-hide" aria-hidden="true">
            <td colspan="6">
              <div>数据加载中...</div>
            </td>
          </tr>
          <tr ng-repeat="item in vm.workerInOutInfo track by $index">
            <td>{{item.recordType == 1 ? '进场' : item.recordType == 2 ? '出场' : '-'}}</td>
            <td>{{item.recordTime | date:"yyyy-MM-dd" || '-'}}</td>
          </tr>
        </tbody>
      </table>
      <div style="margin:20px 0;height:30px;display: inline-block;">共计<span style="color: #008bdd">{{vm.$tableInOut.paginationInOut.totalItems}}</span>条</div>
      <ul uib-pagination
        total-items="vm.$tableInOut.paginationInOut.totalItems"
        items-per-page="vm.$tableInOut.pagination.ITEMS_PER_PAGE"
        ng-model="vm.$tableInOut.paginationInOut.currentPage"
        ng-change="vm.$getWorkerInOut(vm.wid)"
        max-size="vm.$tableInOut.paginationInOut.maxSize"
        next-text="下一页"
        previous-text="上一页"
        class="pagination-sm pull-right"
        boundary-link-numbers="true"
        rotate="true"
        force-ellipses="true"></ul>
    </div>
  </div>
</div>